#ifndef PUNTODEGRILLA_H_
#define PUNTODEGRILLA_H_

#include <iostream>
#include "string.h"
#include "ObjetoModelo.h"
#include "AtributoDesconocidoException.h"
using namespace std;


class PuntoDeGrilla : public ObjetoModelo {
	
protected:

	unsigned int fila;
	unsigned int columna;

public:

	PuntoDeGrilla(int f, int c){
		this->fila = f;
		this->columna = c;
	}

	PuntoDeGrilla(){
		this->fila = 0;
		this->columna = 0;
	}

		/****GETERS****/

	unsigned int getFila(){
		return this->fila;
	}

	unsigned int getColumna(){
		return this->columna;
	}
	
	/****SETERS****/

	void setFila(int f){
		this->fila = f;
	}
	
	void setColumna(int c){
		this->columna = c;
	}


		void agregarAtributo(string n, string v) throw(...) {
		if(n=="fila"){
			this->setFila(atoi(v.c_str()));
		} 
		else {
			if(n=="columna"){
				this->setColumna(atoi(v.c_str()));
			} 
			else {
				throw new AtributoDesconocidoException(n);
			}
		}
	}


};

#endif 